package cc.vv.baselibrary.api;

public class BaseUrl {
    /**
     * 内外网标识，true为外网；false为内网
     */
    private static final boolean IntranetOrNetwork = false;

    /**
     * http
     */
    private static final String Base_Http = IntranetOrNetwork ? "https://" : "http://";

    /**
     * 公共模块IP
     */
    private static final String Base_IP = IntranetOrNetwork ? "app-api.botu.com" : "192.168.10.36";

    /**
     * 文件上海
     */
    /**
     * 公共模块IP
     */
    private static final String Base_Upload_IP = IntranetOrNetwork ? "app-api.botu.com" : "192.168.10.34";


    /**
     * 公用端口号：
     */
    private static final String BASE_PORT = IntranetOrNetwork ? "8000" : "20001";

    /**
     * 公用端口号文件上传
     */
    private static final String BASE_PORT_UPLOAD = IntranetOrNetwork ? "8000" : "20050";

    /**
     * 公共H5P
     */
    private static final String Base_H5_IP = IntranetOrNetwork ? "app-h5.botu.com" : "192.168.10.37";

    /**
     * 公用H5端口号：7001
     */
    private static final String BASE_H5_PORT = IntranetOrNetwork ? "9001" : "7001";


    /**
     * 公共基础接口
     */
    public static String getBaseUrl_Shop_Api() {
        return Base_Http + Base_IP + ":" + BASE_PORT;
    }

    /**
     * 文件上传
     */
    public static String getBaseUrl_Shop_UpLoad() {
        return Base_Http + Base_Upload_IP + ":" + BASE_PORT_UPLOAD;
    }


    private static final String getBaseIP_H5() {
        return Base_Http + Base_H5_IP + ":" + BASE_H5_PORT;
    }

    public static final String getBaseUrl_H5(int sort) {
        String url = getBaseIP_H5();
        switch (sort) {
            case 0:
                //医疗专用
                url += "/#/?sort=8&id=";
                break;
            case 9:
                url += "/#/?sort=9&id=";
                break;
            case 1:
                url += "/#/?sort=1&id=";
                break;
            case 16:
                url += "/#/bigV?sort=16&token=";
                break;
            case 20:
                url += "/#/?sort=2&path=2&id=";
                break;
            case 21:
                url += "/#/?sort=2&path=1&ids=";
                break;
            case 3:
                url += "/#/?sort=3&id=";
                break;
            case 4:
                url += "/#/?sort=4&id=";
                break;
            case 5:
                url += "/#/?sort=5&code=";
                break;
            case 60:
                url += "/#/?sort=6&code=termsOfService";
                break;
            case 61:
                url += "/#/?sort=6&code=privacyPolicy";
                break;
            case 7:
                url += "/#/?sort=7&text=";
                break;
            case 8:
                url += "/#/home/waitPatient?";
                break;
            case 10:
                url += "/#/rule?sort=6&code=RealnameAuthenticationProtocol";
                break;
            case 11:
                url += "/#/rule?sort=6&code=integralRle";
                break;

            default:
                break;
        }
        return url;
    }


}
